package com.sportwise.controller;

import org.codehaus.jackson.map.annotate.JsonSerialize;

/**
 * Top level web response class, wraps the actual result and contains a holder for possible messages.
 *
 * @param <T> The result data type
 */
@JsonSerialize(include = JsonSerialize.Inclusion.ALWAYS)
public class WebResponse<T extends Object> {

    private String message;
    private T result;

    public WebResponse() {

    }

    public WebResponse(final T result) {
        this.result = result;
    }

    public WebResponse(final String message) {
        this.message = message;
    }

    public T getResult() {
        return this.result;
    }

    public void setResult(final T result) {
        this.result = result;
    }

	public String getMessage() {
		return message;
	}

	public void setMessage(final String message) {
		this.message = message;
	}

}
